<script type="text/javascript">
    RED.nodes.registerType('iotps-config', {
        category: 'config',
        label() {
            return this.name || '默认物联网平台配置'
        },
        defaults: {
            name: {
                value: ''
            },
            url: {
                value: '',
                required: true
            },
            port: {
                value: '',
                required: true
            },
            token: {
                value: '',
                required: true
            }
        }
    })
</script>
<script type="text/x-red" data-template-name="iotps-config">
    <div class="form-row">
      <label for="node-config-input-name"><i class="icon-tag"></i>名称</label>
      <input type="text" id="node-config-input-name" placeholder="默认物联网平台配置">
    </div>
    <div class="form-row">
      <label for="node-config-input-url"><i></i>Url</label>
      <input type="text" id="node-config-input-url" placeholder="平台地址(http或https开头)">
    </div>
    <div class="form-row">
      <label for="node-config-input-port"><i></i>Port</label>
      <input type="text" id="node-config-input-port" placeholder="服务端口">
    </div>
    <div class="form-row">
      <label for="node-config-input-token"><i></i>Token</label>
      <input type="text" id="node-config-input-token" placeholder="平台秘钥Token">
    </div>

</script>